package com.owc.domain.dto.admin;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.HashMap;

/**
 * @Author Jackies
 * @Date 2019/12/18 23:24
 * @Description TODO://
 **/
@NoArgsConstructor
@Data
@ApiModel("系统参数配置")
public class SystemConfigDTO {

	@ApiModelProperty("APP发现页下载地址")
	private String h5Url;
	@ApiModelProperty("区块链配置")
	private ChianBean chian;
	@ApiModelProperty("汇率配置")
	private ExchangeBean exchangeBean;

	@NoArgsConstructor
	@Data
	@ApiModel("手续费相关参数")
	public static class ChianBean {
		@ApiModelProperty("EBC提币手续费")
		private String EBC;
		@ApiModelProperty("OWC提币手续费")
		private String OWC;
		@ApiModelProperty("BTC提币手续费")
		private String BTC;
		@ApiModelProperty("ETH提币手续费")
		private String ETH;
		@ApiModelProperty("USDT_omni提币手续费")
		private String USDT_omni;
		@ApiModelProperty("USDT_ERC20提币手续费")
		private String USDT_ERC20;
		@ApiModelProperty("BTC同步区块数量")
		private String BTC_blockNum;
		@ApiModelProperty("ETH同步区块数量")
		private String ETH_blockNum;
	}

	@ApiModel("汇率参数")
	public static class ExchangeBean{

		private HashMap<String, BigDecimal> rateMap = new HashMap<>();

		@ApiModelProperty("ETH 兑换 EBC汇率")
		private String ETH_EBC_RATE;

		@ApiModelProperty("USDT(ERC20) 兑换 EBC汇率")
		private String EBC_OWC_RATE;

		@ApiModelProperty("EBC兑换OWC汇率")
		private String USDT_ERC20_EBC_RATE;

		public HashMap<String, BigDecimal> getRateMap() {
			return rateMap;
		}

		public String getETH_EBC_RATE() {
			return ETH_EBC_RATE;
		}

		public void setETH_EBC_RATE(String ETH_EBC_RATE) {
			this.rateMap.put("ETH_EBC_RATE",new BigDecimal(ETH_EBC_RATE));
			this.ETH_EBC_RATE = ETH_EBC_RATE;
		}

		public String getEBC_OWC_RATE() {
			return EBC_OWC_RATE;
		}

		public void setEBC_OWC_RATE(String EBC_OWC_RATE) {
			this.rateMap.put("EBC_OWC_RATE",new BigDecimal(EBC_OWC_RATE));
			this.EBC_OWC_RATE = EBC_OWC_RATE;
		}

		public String getUSDT_ERC20_EBC_RATE() {
			return USDT_ERC20_EBC_RATE;
		}

		public void setUSDT_ERC20_EBC_RATE(String USDT_ERC20_EBC_RATE) {
			this.rateMap.put("USDT_ERC20_EBC_RATE",new BigDecimal(USDT_ERC20_EBC_RATE));
			this.USDT_ERC20_EBC_RATE = USDT_ERC20_EBC_RATE;
		}
	}
}
